Document Management
Previous  Top  Next



Use the following commands and functions to manage the documents in NoteTab.


Commands:

^!Close
[ALL,SAVE|DISCARD]
or
^!Close "DocumentName" [SAVE|DISCARD]

Closes the specified document(s). If SAVE
is specified, a modified document will be saved without prompting (unless it has never been saved before). If DISCARD is specified, modified files are closed without prompting or saving. The ALL parameter can be used together with either SAVE or DISCARD. Options should be separated by a comma or a semicolon, and no spaces; For example: ^!Close ALL,SAVE

^!DestroyDoc [DocumentName]
Closes the current document or the specified document without prompting and deletes the corresponding file from disk if it exists (the file is actually sent to the recycle bin).

^!DirectPrint "Title" Data (added in v4.8)
Prints text directly to the printer, bypassing NoteTab's print procedure. Uses default printer settings. Title is the text shown in the Print manager and Data is the text to send directly to the printer. Data can contain printer control codes.

^!Document [FIRST|LAST|NEXT|PREV]
Selects the specified document tab.

^!FocusDoc
Moves the input focus to the active document.

^!LoadEbcdicCharTable FileName (added in v4.6)
Loads the specified file containing the EBCDIC character tables for conversion to and from Windows ANSI. The NoteTab program path is added if you do not specify a fully qualified path name. The extension .ebc is added if you do not specify a filename extension. You can reset the default character table by specifying the Default.ebc file.

^!Open "FileName" [/R] [/J=nnn]
or
^!Open "File1";"File2";"File3"
(added in v4.6)
Opens or selects the specified document "FileName", or opens multiple files (names separated by semicolon). Use fully qualified file names (with path name) to ensure the command finds the correct file. You can use wild cards with this command. The optional switch /R can be used to open the file(s) as Read-Only, and the /J= switch can be used to place the cursor at a specific line number when it is opened. If /J=-1, the cursor will be placed at the beginning of the last line.

^!OpenAscii FileName (added in v4.6)
or
^!OpenAscii FileName1;FileName2;FileName3
(added in v4.6)
Opens and translates the text from ASCII format to ANSI, or selects the specified document "FileName". You can use wild cards with this command.

^!OpenEbcdic FileName [/W=nnn] (added in v4.6)
or
^!OpenEbcdic FileName1;FileName2;FileName3
(added in v4.6)
Opens and translates the text from EBCDIC format to ANSI, or selects the specified document "FileName". You can use wild cards with this command. The optional parameter "/W=nnn" can be used to define a line length for fixed-width EBCDIC files. "nnn" represents the width in characters; a value of 0 indicates variable line lengths delimited with carriage returns. Example: ^!OpenEbcdic /W=132


^!OpenFavorites CategoryName (added in v4.52)
Opens all the documents listed in the specified Favorites list. CategoryName should be specified without a path name or extension.

^!OpenReadOnly FileName (added in v4.6)
Opens or selects the specified document "FileName". You can use wild cards with this command. Newly opened files are set as Read-Only.

^!Print [ALL]
Prints the active document. If the optional parameter "ALL" is used, all the open documents are printed.

^!RenameDoc NewName (added in v4.6)
Renames the active document. The disk file is also renamed if it exists.

^!Save [AS|ALL]
or
^!Save AS FileName

Saves the active document. If the optional parameter "AS
" is used, the "Save As" dialog box is displayed. If the optional parameter "ALL" is used, all the modified documents are saved. You cannot use both parameters together. If you specify a file name after the "Save AS" element, the Save As dialog box is not displayed and the specified file name is used.
The following Clip example will save the changes made to the active document:
^!Save
The next example will save all modified documents:
^!Save ALL
The following Clip example will save the active document as a new file called Temp.txt:
^!Save AS c:\My Documents\Temp.txt

^!SaveAscii FileName (added in v4.6)
Similar to the ^!Save
command (and accepts the same parameters) but saves the document using the DOS extended ASCII character set instead of Windows ANSI.

^!SaveEbcdic FileName [/W=nnn] (added in v4.6)
Similar to the ^!Save
command (and accepts the same parameters) but saves the document in EBCDIC format. The optional parameter "/W=nnn" can be used to define a line length for fixed-width EBCDIC files. "nnn" represents the width in characters; a value of 0 indicates variable line lengths delimited with carriage returns. Example: ^!SaveEbcdic /W=132

^!SaveFavorites CategoryName (added in v4.52)
Adds all the currently open document names to the specified Favorites list. The Favorites category is created if it doesn't exist. CategoryName should be specified without a path name or extension.

^!SetDocIndex IndexValue
Activates the document at the specified position in the tab bar. First document is 1.

^!SetNameFormat Mask (added in v4.6)
The name format is used when new documents are created. The code "%d" indicates where the incremental numbering is inserted in the name. In the following example, the "0.2" between the % and d tells NoteTab to format numbers smaller than 2 digits with leading zeroes: NoName%0.2d.txt

^!SetTopicIndex IndexValue
Activates the topic at the specified position in the current outline document. First topic is 1.

^!ShowHeadings [True|False] (added in v4.52)
Shows or hides Outline heading names in the editor window.


Functions:

^$GetDocCount$
Returns the number of open documents in editor.

^$GetDocName$
^$GetDocName(Index)$
(added in v4.52)
Returns the active document name, if no index is specified, or the document name at specified index position. An invalid index number returns an empty string. The first document is at index 1.

^$GetDocIndex$
^$GetDocIndex(Name)$

Returns the index position of the active document, or the document refered by the Name parameter.

^$GetNameFormat$ (added in v4.6)
This function returns the current new document name format.

^$GetPasteBoardIndex$
Returns the index position of the PasteBoard document. Returns 0 if there is no PasteBoard document.

^$GetSecondWindowIndex$
Returns the index position of document in second window. Returns 0 if there is no second window.

^$GetTopicCount$
Returns number of topics in the current outline document.

^$GetTopicIndex$
^$GetTopicIndex(Name)$
(added in v4.51)
Returns the index position of current outline topic. Use the optional Name parameter to find the index position of another topic.

^$GetTopicName$
^$GetTopicName(Index)$
(added in v4.52)
Returns the current outline heading name, if no index is specified, or the heading name at specified index position. An invalid index number returns an empty string. The first heading is index 1.

^$IsShowHeadings$ (added in v4.52)
Returns 1 if headings are displayed in the outline document window and 0 if they are not.